﻿<%
Function Chk_Cid()
	Dim Csid
	If isnumeric(Csid) Then
		Csid=Csid
	Else
		Csid=mid(Csid,1,instr(Csid,"_")-1)
	End If
End Function

Function Cs_Nd(csv)
	Cs_Nd=True
	if not isnumeric(csv) Then
		Cs_Nd=False
		Exit Function
	End If
	if cint(csv)<1 Then
		Cs_Nd=False
		Exit Function
	End If
End Function

'//* 读取当前模型栏目 *//
Function Class_InitSelect(ByVal oChannelID,ByVal oClassID)
	Dim Tmpl,sql3,rs3,n_id,chi
	Tmpl=Tmpl&"                <script type='text/javascript'>;" & vbCrlf
	Tmpl=Tmpl&"                function changeClassType(ClassID){" & vbCrlf
	Tmpl=Tmpl&"                    $.ajax({" & vbCrLf
	Tmpl=Tmpl&"                        type: 'post'," & vbCrLf
	Tmpl=Tmpl&"                        url: '"&InstallDir&"Include/Class.asp?Action=ClassType'," & vbCrLf
	Tmpl=Tmpl&"                        data: {ChannelID:"&oChannelID&",ClassID:ClassID}," & vbCrLf
	Tmpl=Tmpl&"                        dataType: 'json'," & vbCrLf
	Tmpl=Tmpl&"                        success: function(res) {" & vbCrLf
	Tmpl=Tmpl&"                            if(document.getElementById('Moban')){" & vbCrlf
	Tmpl=Tmpl&"                                document.getElementById('Moban').value=res.ContentMoban;" & vbCrlf
	Tmpl=Tmpl&"                            }" & vbCrlf
	Tmpl=Tmpl&"                            if(document.getElementById('SkinID')){" & vbCrlf
	Tmpl=Tmpl&"                                document.getElementById('SkinID').value=res.ContentSkinID;" & vbCrlf
	Tmpl=Tmpl&"                            }" & vbCrlf
	Tmpl=Tmpl&"                            if(document.getElementById('TemplateID')){" & vbCrlf
	Tmpl=Tmpl&"                                document.getElementById('TemplateID').value=res.ContentTemplateID;" & vbCrlf
	Tmpl=Tmpl&"                            }" & vbCrlf
	Tmpl=Tmpl&"                        }" & vbCrLf
	Tmpl=Tmpl&"                    });" & vbCrLf
	Tmpl=Tmpl&"                }" & vbCrlf
	Tmpl=Tmpl&"                </script>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">所属栏目：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <div id=""ClassID"" class=""xm-select-demo""></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Class_InitSelect=Tmpl
End Function

Function GetClass_Option(oChannelID, oClassID, iClassID)
	Dim rsClass, sqlClass, strTemp, tmpDepth, i
	sqlClass = "Select ClassID,ClassName,ClassDepth From Class Where ChannelID="&oChannelID&" and ClassParent="&oClassID&" Order By ClassOrder Asc,ClassID Asc"
	Call Exec(rsClass,sqlClass,2)
	If rsClass.BOF And rsClass.EOF Then
		strTemp = ""
	Else
		strTemp = ""
		Do While Not rsClass.EOF
			If Int(rsClass(2))<>0 Then
				For i = 1 To Int(rsClass(2))
					strTemp = strTemp & "    "
				Next
			End If
			strTemp = strTemp & "            {name: '"&rsClass(1)&"', value: "&Int(rsClass(0))&""
			If Int(rsClass(0))=iClassID Then strTemp = strTemp & ", selected: true"
			strTemp = strTemp & ", children: [" & vbCrLf
			strTemp = strTemp & GetClass_Option(oChannelID, Int(rsClass(0)), iClassID)
			If Int(rsClass(2))<>0 Then
				For i = 1 To Int(rsClass(2))
					strTemp = strTemp & "    "
				Next
			End If
			strTemp = strTemp & "            ]}," & vbCrLf
			rsClass.MoveNext
		Loop
	End If
	rsClass.Close
	Set rsClass = Nothing
	GetClass_Option = strTemp
End Function

'//* 后台模型栏目列表 *//
Function Left_List_Class(ByVal sChannel,ByVal sHiddenNum,ByVal sDeleteNum)
	Dim Temp,ClassName,nccid,ClassChild,ClassDepth,foo,fi,cc,oFolder,up_down,fos
	Temp=Temp&"<div class=""treelistmain body"">" & vbCrlf
	Temp=Temp&"  <div class=""categoryserach"">" & vbCrlf
	Temp=Temp&"    <div class=""input-group"">" & vbCrlf
	Temp=Temp&"      <input type=""text"" class=""form-control"" placeholder=""输入名称，按回车搜索"" onkeydown=""if(event.keyCode==13) highlight(this.value);"">" & vbCrlf
	Temp=Temp&"    </div>" & vbCrlf
	Temp=Temp&"  </div>" & vbCrlf
	Temp=Temp&"  <div class=""treetools"">" & vbCrlf
	Temp=Temp&"    <ul>" & vbCrlf
	Temp=Temp&"      <li><a href=""javascript:ftips(1);"" onmouseover=""layer.tips('审核" & ChannelTit & "',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();""><i class=""icon-check-square-o""></i>"
	If sHiddenNum <> 0 Then Temp=Temp&"<span class=""badge bg-important"" id=""id1"">" & sHiddenNum & "</span>"
	Temp=Temp&"</a></li>" & vbCrlf
	Temp=Temp&"      <li><a href=""javascript:ftips(2);"" onmouseover=""layer.tips('重新排序',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();""><i class=""icon-unsorted""></i>"
	Temp=Temp&"<span class=""badge bg-important hide"" id=""id2"">0</span>"
	Temp=Temp&"</a></li>" & vbCrlf
	Temp=Temp&"      <li><a href=""javascript:ftips(0);"" onmouseover=""layer.tips('回收站',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();""><i class=""icon-trash-o""></i>"
	If sDeleteNum <> 0 Then Temp=Temp&"<span class=""badge bg-important"" id=""id3"">" & sDeleteNum & "</span>"
	Temp=Temp&"</a></li>" & vbCrlf
	Temp=Temp&"    </ul>" & vbCrlf
	Temp=Temp&"  </div>" & vbCrlf
	Temp=Temp&"  <div class=""treelist"">" & vbCrlf
	Temp=Temp&"    <section class=""treepanel"">" & vbCrlf
	Temp=Temp&"      <div id=""panel-bodys"">" & vbCrlf
	Temp=Temp&"        <ul id=""tree"">" & vbCrlf
	Temp=Temp&"          <li><a href='javascript:w(0);' onclick='o_p(0,this)' class='i-t' onmouseover=""layer.tips('全部" & ChannelTit & "',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();"">全部" & ChannelTit & "</a></li>" & vbCrlf
	Sql="Select ClassID,ClassName,ClassChild,ClassDepth From Class Where ChannelID="&sChannel&" And ClassDepth=0 Order By ClassOrder Asc,ClassID Asc"
	Call Exec(Rs,Sql,2)
	If Rs.BOF And Rs.EOF Then
	Else
		Do While Not Rs.Eof
			Temp=Temp&"          <li><a href='javascript:w("&rs("ClassID")&");' onclick='o_p("&rs("ClassID")&",this)' class='i-t' onmouseover=""layer.tips('" & Rs("ClassName") & "',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();"">"&Rs("ClassName")&"</a>"&getSubClass(sChannel, rs("ClassID"))&"</li>" & vbCrlf
			Rs.MoveNext
		Loop
		Rs.Close
	End If
	Temp=Temp&"        </ul>" & vbCrlf
	Temp=Temp&"      </div>" & vbCrlf
	Temp=Temp&"    </section>" & vbCrlf
	Temp=Temp&"  </div>" & vbCrlf
	Temp=Temp&"</div>" & vbCrlf
	Temp=Temp&"<link href="""&InstallDir&AdminFolder&"/Plugins/tree/css/pxgridsicons.min.css"" rel=""stylesheet"" />" & vbCrlf
	Temp=Temp&"<link rel=""stylesheet"" type=""text/css"" href="""&InstallDir&AdminFolder&"/Plugins/tree/css/jquery-tree.css"" />" & vbCrlf
	Temp=Temp&"<script type=""text/javascript"" src="""&InstallDir&AdminFolder&"/Plugins/tree/js/jquery-tree.min.js""></script>" & vbCrlf
	Temp=Temp&"<script type=""text/javascript"">" & vbCrlf
	Temp=Temp&"var global_cid = '';" & vbCrlf
	Temp=Temp&"$('#tree').explr({" & vbCrlf
	Temp=Temp&"	rememberState   : true," & vbCrlf
	Temp=Temp&"	startCollapsed  : false," & vbCrlf
	Temp=Temp&"	treeWidth   : 180" & vbCrlf
	Temp=Temp&"});" & vbCrlf
	Temp=Temp&"var parentpos = top.$(""#position"").html();" & vbCrlf
	Temp=Temp&"function o_p(cid,obj) {" & vbCrlf
	Temp=Temp&"    $("".i-t"").css('color','#666');" & vbCrlf
	Temp=Temp&"    $(obj).css('color','#cb0d0d');" & vbCrlf
	Temp=Temp&"    var te = $(obj).text();" & vbCrlf
	Temp=Temp&"    top.$(""#position"").html(parentpos+te+""<span>></span>"");" & vbCrlf
	Temp=Temp&"    parent.$(""#iframeid"").attr('src','?Action=Listing&ChannelID=" & sChannel & "&ClassID='+cid);" & vbCrlf
	Temp=Temp&"    global_cid = cid;" & vbCrlf
	Temp=Temp&"}" & vbCrlf
	Temp=Temp&"function w(s) {}" & vbCrlf
	Temp=Temp&"function ftips(status) {" & vbCrlf
	Temp=Temp&"    if (status==2){" & vbCrlf
	Temp=Temp&"        parent.$(""#iframeid"").attr('src','?Action=ReOrder&ChannelID=" & sChannel & "&ClassID='+global_cid+'&Status='+status);" & vbCrlf
	Temp=Temp&"    }else{" & vbCrlf
	Temp=Temp&"        parent.$(""#iframeid"").attr('src','?Action=Listing&ChannelID=" & sChannel & "&ClassID='+global_cid+'&Status='+status);" & vbCrlf
	Temp=Temp&"    }" & vbCrlf
	Temp=Temp&"}" & vbCrlf
	Temp=Temp&"function highlight(s){" & vbCrlf
	Temp=Temp&"	if (s.length==0){" & vbCrlf
	Temp=Temp&"		return false;" & vbCrlf
	Temp=Temp&"	}" & vbCrlf
	Temp=Temp&"	$("".i-t"").css('color','#666');" & vbCrlf
	Temp=Temp&"	var total = 0;" & vbCrlf
	Temp=Temp&"	$(""a"").each(function(){" & vbCrlf
	Temp=Temp&"		if(search_text(s,$(this).text())) {" & vbCrlf
	Temp=Temp&"			$(this).css('color','#cb0d0d');" & vbCrlf
	Temp=Temp&"			total++;" & vbCrlf
	Temp=Temp&"			if(total==1) {" & vbCrlf
	Temp=Temp&"				$(this).click();" & vbCrlf
	Temp=Temp&"			}" & vbCrlf
	Temp=Temp&"		}" & vbCrlf
	Temp=Temp&"		//console.log($(this).text());" & vbCrlf
	Temp=Temp&"	});" & vbCrlf
	Temp=Temp&"}" & vbCrlf
	Temp=Temp&"function search_text(s,text){" & vbCrlf
	Temp=Temp&"	if(text.match(s)) return true;" & vbCrlf
	Temp=Temp&"}" & vbCrlf
	Temp=Temp&"</script>" & vbCrlf
	Temp=Temp&"<script src="""&InstallDir&AdminFolder&"/Plugins/tree/js/jquery.nicescroll.js"" type=""text/javascript""></script>" & vbCrLf
	Temp=Temp&"<script src="""&InstallDir&AdminFolder&"/Plugins/tree/js/pxgrids-scripts.js""></script>" & vbCrLf
	Left_List_Class=Temp
End Function

Function getSubClass(ChannelID,ClassID)
	Dim Rs, Sql
	Sql="select * from Class where ChannelID=" & ChannelID & " and ClassParent=" & ClassID & " Order By ClassOrder Asc,ClassID Asc"
	Call Exec(Rs,Sql,2)
	If Rs.BOF And Rs.EOF Then
	Else
		If Int(rs("ClassDepth"))<>0 Then
			For i = 1 To Int(rs("ClassDepth"))
				getSubClass=getSubClass&"  "
			Next
		End If
		getSubClass=getSubClass&vbCrlf&"              <ul>" & vbCrlf
		Do While Not Rs.Eof
			getSubClass=getSubClass&"                <li><a href='javascript:w("&rs("ClassID")&");' onclick='o_p("&rs("ClassID")&",this)' class='i-t' onmouseover=""layer.tips('" & Rs("ClassName") & "',this,{tips: [1, '#000']});"" onmouseout=""layer.closeAll();"">" & Rs("ClassName") & "</a>"&getSubClass(ChannelID, rs("ClassID"))
			getSubClass=getSubClass&"</li>" & vbCrlf
			Rs.MoveNext
		Loop
		getSubClass=getSubClass&"              </ul>" & vbCrlf
		getSubClass=getSubClass&"            "
	End If
End Function

Function jsSubClass(ChannelID,ClassID)
	Dim Rs, Sql
	Sql="select * from Class where ChannelID=" & ChannelID & " and ClassParent=" & ClassID & " Order By ClassOrder Asc,ClassID Asc"
	Call Exec(Rs,Sql,2)
	if Rs.eof then
	else
		Do While Not Rs.Eof
			If Int(Rs("ClassParent"))=0 Then
				jsSubClass=jsSubClass&"_data.push(['" & Int(Rs("ClassID")) & "','" & Int(Rs("ClassName")) & "']);"
			Else
				jsSubClass=jsSubClass&"_data.push(['" & Int(Rs("ClassID")) & "','"
				For chi=1 To Int(Rs("ClassDepth"))-1
					jsSubClass=jsSubClass&"│"
				Next
				jsSubClass=jsSubClass&"├" & Rs("ClassName") & "']);"
				jsSubClass=jsSubClass&jsSubClass(ChannelID, Rs("ClassID"))
			End If
			Rs.MoveNext
		Loop
	end if
End Function

'//* 读取当前模型关键字 *//
Function KeyWord_Init(oChannelID,oKeyWord)
	Dim Tmpl
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">关键字：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='Keyes' name='Keyes' value='"&oKeyWord&"' size='30' maxlength='255' data-role='tagsinput'>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	KeyWord_Init=Tmpl
End Function

'//* 模型后台发布信息相关属性 *//
Function Info_Init(oRemote,oFrist,oHidden,oHits)
	Dim Tmpl
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&ChannelTit&"属性：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='checkbox' id='Remote' name='Remote' value='yes' title='保存远程图片'"
	If oRemote=True Then Tmpl=Tmpl&" checked"
	Tmpl=Tmpl&">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='checkbox' id='Frist' name='Frist' value='yes' title='提取首张图片'"
	If oFrist=True Then Tmpl=Tmpl&" checked"
	Tmpl=Tmpl&">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='checkbox' id='Hidden' name='Hidden' value='yes' title='隐藏/审核'"
	If oHidden=False Then Tmpl=Tmpl&" checked"
	Tmpl=Tmpl&">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&ChannelTit&"浏览：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-inline"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='Hits' name='Hits' value='"&oHits&"' size='6' maxlength='10' class='layui-input'>"
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-inline layui-form-mid layui-word-aux"">" & vbCrlf
	Tmpl=Tmpl&"                        人次"
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Info_Init=Tmpl
End Function

Function Html_LinkUrl(ByVal LinkUrl)
	Dim Tmpl
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">转向链接：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-3"">" & vbCrlf
	Tmpl=Tmpl&"                        <input name='LinkUrl' type='text' id='LinkUrl' value='" & LinkUrl & "' size='50' maxlength='255' lay-verify=""LinkUrl"" class='layui-input'"
    If LinkUrl = "" Or LinkUrl = "http://" Then Tmpl=Tmpl&" disabled"
	Tmpl=Tmpl&">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-inline"">" & vbCrlf
	Tmpl=Tmpl&"                        <input name='UseLinkUrl' type='checkbox' id='UseLinkUrl' value='Yes' title='使用转向链接' lay-filter='UseLinkUrl' onClick='rUseLinkUrl();'"
    If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&" checked"
	Tmpl=Tmpl&">"
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Html_LinkUrl=Tmpl
End Function

Function Html_Edit(ByVal LinkUrl,ByVal Intronames,ByVal Introtits,ByVal Intro,ByVal names,ByVal tits,ByVal content,ByVal width,ByVal height)
	Dim Tmpl
	Tmpl=Tmpl&"                <div class=""layui-form-item layui-form-text"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&ChannelTit&Introtits&"：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <textarea id='"&Intronames&"' name='"&Intronames&"' rows='4' cols='80' class=""layui-textarea"">"&Intro&"</textarea>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item layui-form-text""  id='ChannelContent' style=""display:"
	If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&"none"
	Tmpl=Tmpl&""">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&ChannelTit&tits&"：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <textarea id='"&names&"' name='"&names&"' lay-verify="""&names&""">"&content&"</textarea>"
	Tmpl=Tmpl&Vbcrlf&"<script type=""text/javascript"">"
	Tmpl=Tmpl&Vbcrlf&"var editor = UE.getEditor('"&names&"',{serverUrl:'"&InstallDir&AdminFolder&"/Include/Upload.asp?channelid=" & ChannelID & "&classid=" & ClassID & "',toolbars:[['Fullscreen', 'Source', '|', 'Undo', 'Redo', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Bold', 'Italic', 'Underline', 'Fontborder', 'Strikethrough', 'Superscript', 'Subscript', 'Removeformat', 'Formatmatch', 'Autotypeset', 'Blockquote', 'Pasteplain', '|', 'Forecolor', 'Backcolor', 'Insertorderedlist', 'Insertunorderedlist', 'Selectall', 'Cleardoc', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Rowspacingtop', 'Rowspacingbottom', 'Lineheight', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Customstyle', 'Paragraph', 'Fontfamily', 'Fontsize', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Directionalityltr', 'Directionalityrtl', 'Indent', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Justifyleft', 'Justifycenter', 'Justifyright', 'Justifyjustify', '|', 'Touppercase', 'Tolowercase', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Link', 'Unlink', 'Anchor', '|', 'Imagenone', 'Imageleft', 'Imageright', 'Imagecenter', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Simpleupload', 'Insertimage', 'Emotion', 'Scrawl', 'Insertvideo', 'Music', 'Attachment', 'Map', 'Insertframe', 'Insertcode', 'Pagebreak', 'Template', 'Background', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Horizontal', 'Date', 'Time', 'Spechars', 'Wordimage', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Inserttable', 'Deletetable', 'Insertparagraphbeforetable', 'Insertrow', 'Deleterow', 'Insertcol', 'Deletecol', 'Mergecells', 'Mergeright', 'Mergedown', 'Splittocells', 'Splittorows', 'Splittocols', 'Charts', '|',"
	Tmpl=Tmpl&Vbcrlf&"'Print', 'Preview', 'Searchreplace', 'Help']],initialFrameWidth:'" & width & "',initialFrameHeight:'" & height & "'});"
	Tmpl=Tmpl&Vbcrlf&"</script>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Html_Edit=Tmpl
End Function

'//* 模型后台发布信息SEO *//
Function Html_SEO(ByVal SEOTitle,ByVal SEOKeyWord,ByVal SEODescript)
	Dim Tmpl
	Tmpl=Tmpl&"            </div>" & vbCrlf
	Tmpl=Tmpl&"            <div class=""layui-tab-item"">" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">SEO标题</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' maxlength='255' id='SEOTitle' name='SEOTitle' size='40' value='" & SEOTitle & "' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux"">留空则默认显示"&ChannelTit&"标题,模板里请用标签{$GetSEOTitle}调用。</div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item layui-form-text"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">SEO关键字</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <textarea id='SEOKeyWord' name='SEOKeyWord' cols='60' rows='5' class=""layui-textarea"">" & SEOKeyWord & "</textarea>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux"">留空则默认显示"&ChannelTit&"里设置的KeyWords,模板里请用标签{$GetSEOKeyWords}调用。</div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item layui-form-text"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">SEO描述</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <textarea id='SEODescript' name='SEODescript' cols='60' rows='5' class=""layui-textarea"">" & SEODescript & "</textarea>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux"">留空则默认显示"&ChannelTit&"简介,模板里请用标签{$GetSEODescription}调用。</div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"            </div>" & vbCrlf
	Html_SEO=Tmpl
End Function

'//* 模型后台发布信息模板 *//
Function Html_Moban(ByVal LinkUrl,ByVal Moban,ByVal SkinID,ByVal TemplateID,ByVal oChannelID)
	Dim Tmpl
	Tmpl=Tmpl&"            <div class=""layui-tab-item"">" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"" id='ChannelMoban' style=""display:"
	If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&"none"
	Tmpl=Tmpl&""">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">默认模板</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-inline"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='Moban' name='Moban' value='" & Moban & "' size='40' maxlength='255' class='layui-input' readonly>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectMoban('" & ChannelID & "','Moban');"">选择模板</button><button type=""button"" class=""layui-btn layui-btn-danger"" hidefocus=""true"" onclick=""ClearColor('Moban');"">清空</button>&nbsp;&nbsp;可以为空" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"" id='ChannelMoban2' style=""display:"
	If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&"none"
	Tmpl=Tmpl&""">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">默认风格</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-inline"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='SkinID' name='SkinID' value='" & SkinID & "' size='40' maxlength='255' class='layui-input' readonly>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectCss('SkinID');"">选择风格</button><button type=""button"" class=""layui-btn layui-btn-danger"" hidefocus=""true"" onclick=""ClearColor('SkinID');"">清空</button>&nbsp;&nbsp;可以为空" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	'Tmpl=Tmpl&"                <div class=""layui-form-item"" id='ChannelMoban3' style=""display:"
	'If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&"none"
	'Tmpl=Tmpl&""">" & vbCrlf
	'Tmpl=Tmpl&"                    <label class=""layui-form-label"">默认框架</label>" & vbCrlf
	'Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	'Tmpl=Tmpl&"                        "&Admin_ShowTemplate_Option(TemplateID,"TemplateID",3,oChannelID)&"" & vbCrlf
	'Tmpl=Tmpl&"                    </div>" & vbCrlf
	'Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"            </div>" & vbCrlf
	Html_Moban=Tmpl
End Function

'//* 模型后台发布信息分页方式 *//
Function Html_Page(ByVal LinkUrl,ByVal PaginationType,ByVal MaxCharPerPage,ByVal PageTitle)
	Dim Tmpl
	Tmpl=Tmpl&"                <div class=""layui-form-item"" id='ChannelPage' style=""display:"
	If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&"none"
	Tmpl=Tmpl&""">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">分页方式：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-i"">" & vbCrlf
	Tmpl=Tmpl&"                        "&SelectInit("PaginationType",Split("不分页|自动分页|手动分页","|"),Split("0|1|2","|"),PaginationType)&"" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-t"">" & vbCrlf
	Tmpl=Tmpl&"                        <strong><font color='#0000FF'>注：</font></strong><font color='#0000FF'>手动分页符标记为</font>“<font color='#FF0000'>[NextPage]</font>”<font color='#0000FF'>，注意大小写</font>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"" id='ChannelPage2' style=""display:"
	If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&"none"
	Tmpl=Tmpl&""">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label""></label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-t"">" & vbCrlf
	Tmpl=Tmpl&"                        自动分页时的每页大约字符数（包含HTML标记且必须大于100）：" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-i"">" & vbCrlf
	Tmpl=Tmpl&"                        <input name='MaxCharPerPage' type='text' id='MaxCharPerPage' value='" & MaxCharPerPage & "' size='8' maxlength='8' class='layui-input'>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item layui-form-text"" id='ChannelPage3' style=""display:"
	If LinkUrl <> "" And LinkUrl <> "http://" Then Tmpl=Tmpl&"none"
	Tmpl=Tmpl&""">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">分页标题：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <textarea name='PageTitle' id='PageTitle' cols='60' rows='5' class=""layui-textarea"">" & Replace(PageTitle,"§",vbcrlf) & "</textarea>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux"">一行一个标题（可留空）</div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Html_Page=Tmpl
End Function

'//* 模型发布信息（单）图片上传 *//
Function Info_FrmUpload(oChannelID,oPic,oIsPic,oTypes,oTit,oTxt,oType,oHome,oTempUpload)
	Dim Tmpl
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTit&"：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='"&oIsPic&"' name='"&oIsPic&"' value='"&oPic&"' size='50' maxlength='100' onclick=""doPreview('"&oIsPic&"','"&InstallDir&"','"&InstallDir&UploadSetting(1)&"')"" class='layui-input'>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	If oTypes=0 Then
		Tmpl=Tmpl&"                    <div class=""layui-input-i"">" & vbCrlf
		Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectFile('"&oChannelID&"','"&ChannelModuleType&"','1','1','Pic','TempUploadFiles','','','0','" & InstallDir & UploadSetting(1) & "','" & UploadSetting(1) & "','" & InstallDir & "','" & InstallDir & UploadSetting(1) & "/" & ChannelDir & "','/" & ChannelDir & "');"">浏览</button>" & vbCrlf
		Tmpl=Tmpl&"                    </div>" & vbCrlf
	End If
	Tmpl=Tmpl&"                </div>" & vbCrlf
	If oHome=0 Then
		Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
		Tmpl=Tmpl&"                    <label class=""layui-form-label"">上传"&oTxt&"：</label>" & vbCrlf
		Tmpl=Tmpl&"                    <div class=""layui-input-i"">" & vbCrlf
		Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""UploadFile('"&oChannelID&"','"&ChannelModuleType&"','1','0','"&ClassID&"','1','0','0','"&oIsPic&"','"&oTempUpload&"','','','','" & InstallDir & UploadSetting(1) & "','" & UploadSetting(1) & "','" & InstallDir & "','" & InstallDir & UploadSetting(1) & "/" & ChannelDir & "','/" & ChannelDir & "');"">上传</button>" & vbCrlf
		Tmpl=Tmpl&"                    </div>" & vbCrlf
		Tmpl=Tmpl&"                </div>" & vbCrlf
		'Tmpl=Tmpl&"<iframe frameborder='0' id='UploadFiles' width='100%' height='25' scrolling='no' src='"&InstallDir&"Include/Upload.asp?ID="&oChannelID&"&Type="&oType&"&Obj="&oIsPic&"&TObj="&oTempUpload&"'></iframe>" & vbCrlf
	End If
    Info_FrmUpload=Tmpl
End Function

'//* 模型发布信息图片控制 *//
Function Info_UploadList(oIsPic,oTxt,oSkin,oTempUploadFiles,oTempUpload)
	Dim Tmpl, StrDownloadUrl
	Tmpl = Tmpl & "                <div class=""layui-form-item"">" & vbCrlf
	Tmpl = Tmpl & "                    <label class=""layui-form-label"">已上传：</label>" & vbCrlf
	Tmpl = Tmpl & "                    <div class=""layui-input-i"">" & vbCrlf
	Tmpl = Tmpl & "                        <select id="""&oTempUpload&""" name="""&oTempUpload&""" size=""2"" onclick=""doPreview('"&oTempUpload&"','"&InstallDir&"','"&InstallDir&UploadSetting(1)&"')"" ondblclick=""ModifyUrl('','','"&oTempUpload&"');"" class=""select"" lay-ignore>"
	If oTempUploadFiles<>"" Then
		StrDownloadUrl=Trim(oTempUploadFiles)
		If Instr(StrDownloadUrl,"@@@") >0 Then
			StrDownloadUrl=Split(StrDownloadUrl,"@@@")
			For i=0 to Ubound(StrDownloadUrl)
				Tmpl = Tmpl & Vbcrlf & "<option value="&StrDownloadUrl(i)&">"&StrDownloadUrl(i)&"</option>"
			Next
		Else
			Tmpl = Tmpl & Vbcrlf & "<option value="&StrDownloadUrl&">"&StrDownloadUrl&"</option>"
		End If
	End If
	Tmpl = Tmpl & "</select><br />"
	Tmpl = Tmpl & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SetPicUrl('"&oTempUpload&"','"&oIsPic&"');"">设为首页"&oTxt&"</button>"
	Tmpl = Tmpl & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""InsertEditor('"&oTempUpload&"','"&InstallDir&"','"&InstallDir&UploadSetting(1)&"');"">插入编辑器</button>"
	Tmpl = Tmpl & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""AddUrl('add','','"&oTempUpload&"');"">添加</button>"
	Tmpl = Tmpl & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""ModifyUrl('','','"&oTempUpload&"');"">修改</button>"
	Tmpl = Tmpl & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""DelUrl('','"&oTempUpload&"');"">删除</button>"
	Tmpl = Tmpl & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""UpUrl('','"&oTempUpload&"');"">↑</button>"
	Tmpl = Tmpl & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""DownUrl('','"&oTempUpload&"');"">↓</button>"
	Tmpl = Tmpl & "<input type=""hidden"" id=""UploadFiles"" name=""UploadFiles"" value="""">" & vbCrlf
	Tmpl = Tmpl & "                    </div>" & vbCrlf
	Tmpl = Tmpl & "                    <div class=""layui-input-i"">" & vbCrlf
	Tmpl = Tmpl & "                        <fieldset style=""height:100%""><legend>预览</legend><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""140"" height=""120"" valign=""top""><tr><td align=""center"" valign=""middle"" id=""tdPreview"" height=""100%""></td></tr></table></fieldset>" & vbCrlf
	Tmpl = Tmpl & "                    </div>" & vbCrlf
	Tmpl = Tmpl & "            </div>" & vbCrlf
	Info_UploadList = Tmpl
End Function

Function Info_ZuTu(oChannelID,oZutu,oTxt,oImageArea,oUploadFiles,oIsPic,oTempUpload,oFieldVerify,oFieldTips)
	Dim Tmpl
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">上传"&oTxt&"：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-6"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type=""hidden"" id=""Upload"&oZutu&""" name=""Upload"&oZutu&""" value="""""& oFieldVerify &">" & vbCrlf
	If oFieldVerify<>"" Then oFieldVerify = "lay-verify"
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""UploadFile('"&oChannelID&"','"&ChannelModuleType&"','1','0','"&ClassID&"','10','0','1','"&oZutu&"','"&oImageArea&"','"&oIsPic&"','"&oTempUpload&"','"&oFieldVerify&"','" & InstallDir & UploadSetting(1) & "','" & UploadSetting(1) & "','" & InstallDir & "','" & InstallDir & UploadSetting(1) & "/" & ChannelDir & "','/" & ChannelDir & "');"">本地上传</button>" & vbCrlf
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectFile('"&oChannelID&"','"&ChannelModuleType&"','1','10','"&oIsPic&"','"&oTempUpload&"','"&oZutu&"','"&oImageArea&"','1','" & InstallDir & UploadSetting(1) & "','" & UploadSetting(1) & "','" & InstallDir & "','" & InstallDir & UploadSetting(1) & "/" & ChannelDir & "','/" & ChannelDir & "');"">浏览</button>" & vbCrlf
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""AddImage('"&oZutu&"','"&oImageArea&"','"&oFieldVerify&"');"">远程图片</button>" & vbCrlf
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""ClearImage('"&oImageArea&"');"">清空"&oTxt&"</button>" & vbCrlf
	If oFieldTips<>"" Then Tmpl=Tmpl&"                        &nbsp;"& oFieldTips &"" & vbCrlf
	Tmpl=Tmpl&"                        <ul class=""piclist"" id="""&oImageArea&""">" & vbCrLf
	If oUploadFiles<>"" Then
		StrDownloadUrl=Trim(oUploadFiles)
		If Instr(StrDownloadUrl,",") >0 Then
			StrDownloadUrl=Split(StrDownloadUrl,",")
			For i=0 to Ubound(StrDownloadUrl)
				StrDownloadUrlarr=Split(StrDownloadUrl(i),"@@@")
				Tmpl=Tmpl&"                            <li>" & vbCrLf
				Tmpl=Tmpl&"                                <div class=""img"">" & vbCrLf
				Tmpl=Tmpl&"                                    <img src="""&Replace(StrDownloadUrlarr(0),"{$download_dir}",InstallDir & UploadSetting(1))&""" width=""100"" height=""80"" border=""0"">" & vbCrLf
				Tmpl=Tmpl&"                                </div>" & vbCrLf
				Tmpl=Tmpl&"                                <div class=""pic_other"">" & vbCrLf
				Tmpl=Tmpl&"                                    <div class=""row-fluid"">" & vbCrLf
				Tmpl=Tmpl&"                                        <div class=""span9""><textarea id="""&oZutu&"_desc"" name="""&oZutu&"_desc"">"&StrDownloadUrlarr(1)&"</textarea></div>" & vbCrLf
				Tmpl=Tmpl&"                                        <div class=""span3""><button onclick=""LeftArr(this)"" type=""button"" class=""btn green btn-sm""><i class=""fa fa-arrow-up""></i></button><button onclick=""RightArr(this)"" type=""button"" class=""btn green btn-sm""><i class=""fa fa-arrow-down""></i></button><button onclick=""DelArr(this)"" type=""button"" class=""btn red btn-sm""><i class=""fa fa-trash""></i></button></div>" & vbCrLf
				Tmpl=Tmpl&"                                   </div>" & vbCrLf
				Tmpl=Tmpl&"                               </div>" & vbCrLf
				Tmpl=Tmpl&"                               <input type=""hidden"" id="""&oZutu&""" name="""&oZutu&""" value="""&StrDownloadUrlarr(0)&""" />" & vbCrLf
				Tmpl=Tmpl&"                            </li>" & vbCrLf
			Next
		Else
			StrDownloadUrlarr=Split(StrDownloadUrl,"@@@")
			Tmpl=Tmpl&"                            <li>" & vbCrLf
			Tmpl=Tmpl&"                                <div class=""img"">" & vbCrLf
			Tmpl=Tmpl&"                                    <img src="""&Replace(StrDownloadUrlarr(0),"{$download_dir}",InstallDir & UploadSetting(1))&""" width=""100"" height=""80"" border=""0"">" & vbCrLf
			Tmpl=Tmpl&"                                </div>" & vbCrLf
			Tmpl=Tmpl&"                                <div class=""pic_other"">" & vbCrLf
			Tmpl=Tmpl&"                                    <div class=""row-fluid"">" & vbCrLf
			Tmpl=Tmpl&"                                        <div class=""span9""><textarea id="""&oZutu&"_desc"" name="""&oZutu&"_desc"">"&StrDownloadUrlarr(1)&"</textarea></div>" & vbCrLf
			Tmpl=Tmpl&"                                        <div class=""span3""><button onclick=""LeftArr(this)"" type=""button"" class=""btn green btn-sm""><i class=""fa fa-arrow-up""></i></button><button onclick=""RightArr(this)"" type=""button"" class=""btn green btn-sm""><i class=""fa fa-arrow-down""></i></button><button onclick=""DelArr(this)"" type=""button"" class=""btn red btn-sm""><i class=""fa fa-trash""></i></button></div>" & vbCrLf
			Tmpl=Tmpl&"                                   </div>" & vbCrLf
			Tmpl=Tmpl&"                               </div>" & vbCrLf
			Tmpl=Tmpl&"                               <input type=""hidden"" id="""&oZutu&""" name="""&oZutu&""" value="""&StrDownloadUrlarr(0)&""" />" & vbCrLf
			Tmpl=Tmpl&"                            </li>" & vbCrLf
		End If
	End If
	Tmpl=Tmpl&"                        </ul>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Info_ZuTu = Tmpl
End Function

Function Url_Init(oChannelID,oUrl,oSoftSize,oTypes,oTxt,oType,oIsUrl,oIsSize,oFiles,oIsPic,oTempUpload)
	Dim Tmpl, StrDownloadUrl
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"大小：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-2"">" & vbCrlf
	Tmpl=Tmpl&"                        <input name='"&oIsSize&"' type='text' id='"&oIsSize&"' value='"&oSoftSize&"' size='10' maxlength='10' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux"">KB</div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"地址：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-block"">" & vbCrlf
	Tmpl=Tmpl&"                        <table border=""0"" cellpadding=""0"" cellspacing=""0"" style=""float: left;"">"
	Tmpl = Tmpl & Vbcrlf & "<tr>"
	Tmpl = Tmpl & Vbcrlf & "<td width='*' valign='top'><input type=""hidden"" id="""&oIsUrl&"s"" name="""&oIsUrl&"s"" value="""">" & _
	Vbcrlf&"<select id="""&oIsUrl&""" name="""&oIsUrl&""" size=""2"" onclick=""doPreviews('"&oIsUrl&"','"&InstallDir&"','"&InstallDir&UploadSetting(1)&"');"" ondblclick=""ModifyUrl('','"&oTxt&"地址','"&oIsUrl&"');"" class=""select"" lay-ignore>"
	If oUrl<>"" Then
		StrDownloadUrl=Trim(oUrl)
		If Instr(StrDownloadUrl,"@@@") >0 Then
			StrDownloadUrl=Split(StrDownloadUrl,"@@@")
			For i=0 to Ubound(StrDownloadUrl)
				Tmpl=Tmpl&Vbcrlf&"<option value="&StrDownloadUrl(i)&">"&StrDownloadUrl(i)&"</option>"
			Next
		Else
			Tmpl=Tmpl&Vbcrlf&"<option value="&StrDownloadUrl&">"&StrDownloadUrl&"</option>"
		End If
	End If
	Tmpl=Tmpl&Vbcrlf&"</select><br>" & _
	Vbcrlf&"<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""AddUrl('add','"&oTxt&"地址','"&oIsUrl&"');"">添加"&oTxt&"地址</button>" & _
	Vbcrlf&"<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""ModifyUrl('','"&oTxt&"地址','"&oIsUrl&"');"">修改当前地址</button>" & _
	Vbcrlf&"<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""DelUrl('"&oTxt&"地址','"&oIsUrl&"');"">删除当前地址</button>" & _
	Vbcrlf&"<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""UpUrl('"&oTxt&"地址','"&oIsUrl&"');"">↑</button>" & _
	Vbcrlf&"<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""DownUrl('"&oTxt&"地址','"&oIsUrl&"');"">↓</button>"
	If oTypes=0 Then Tmpl=Tmpl&Vbcrlf&"<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectFile('"&oChannelID&"','"&ChannelModuleType&"','"&oType&"','10','Pic','TempUploadFiles','"&oIsUrl&"','"&oIsSize&"','0','" & InstallDir & UploadSetting(1) & "','" & UploadSetting(1) & "','" & InstallDir & "','" & InstallDir & UploadSetting(1) & "/" & ChannelDir & "','/" & ChannelDir & "');"">浏览</button>"
	Tmpl = Tmpl & Vbcrlf & "</td>"
	Tmpl = Tmpl & Vbcrlf & "</tr>"
	Tmpl = Tmpl & Vbcrlf & "</table>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">上传"&oTxt&"：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""UploadFile('"&oChannelID&"','"&ChannelModuleType&"','"&oType&"','0','"&ClassID&"','5','0','0','"&oIsPic&"','"&oIsUrl&"','"&oTempUpload&"','"&oIsSize&"','','" & InstallDir & UploadSetting(1) & "','" & UploadSetting(1) & "','" & InstallDir & "','" & InstallDir & UploadSetting(1) & "/" & ChannelDir & "','/" & ChannelDir & "');"">上传</button>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Url_Init=Tmpl
End Function

Function DownHome(oChannelID,oTxt,oDayHits,oWeekHits,oMonthHits,oDownHits,oSoftVersion,oSoftType,oSoftLanguage,oCopyrightType,oOperatingSystem,oDemoUrl,oRegUrl,oDecompressPassword)
	Dim Tmpl, i
	Tmpl=Tmpl&"            <div class=""layui-tab-item"">" & vbCrlf
	Tmpl=Tmpl&"<fieldset class=""layui-elem-field"">" & vbCrlf
	Tmpl=Tmpl&"<legend>下载次数：</legend>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-field-box"">" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"<label class=""layui-form-label"">本日：</label>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"<input name='DayHits' type='text' id='DayHits' value='" & oDayHits & "' size='10' maxlength='10' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"<label class=""layui-form-label"">本周：</label>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"<input name='WeekHits' type='text' id='WeekHits' value='" & oWeekHits & "' size='10' maxlength='10' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"<label class=""layui-form-label"">本月：</label>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"<input name='MonthHits' type='text' id='MonthHits' value='" & oMonthHits & "' size='10' maxlength='10' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"<label class=""layui-form-label"">总计：</label>" & vbCrlf
	Tmpl=Tmpl&"<div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"<input name='DownHits' type='text' id='DownHits' value='" & oDownHits & "' size='10' maxlength='10' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"</div>" & vbCrlf
	Tmpl=Tmpl&"</fieldset>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"版本：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='SoftVersion' name='SoftVersion' type='text' value='" & oSoftVersion & "' size='15' maxlength='100' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"类别：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <div id=""SoftType_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:150px;""><input type=""text"" ztype=""select"" id=""SoftType"" name=""SoftType"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:150px;position:absolute;z-index:-1;"" value=""" & Trim(oSoftType) & """ startvalue=""" & Trim(oSoftType) & """/><input type=""text"" id=""SoftType_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:150px;"" /><a id=""SoftType_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""SoftType_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""SoftType_ul"" style=""left:-1px; width:-1px;""><script>Combox_SoftType_Init=function(){var _el=Zving.getDom('SoftType');if(_el._components){return true;}var  _data=[];var  _DataSource;"
	For i = 0 To UBound(arrSoftType)
		If Trim(arrSoftType(i)) <> "" Then
			Tmpl=Tmpl & "_data.push(['" & arrSoftType(i) & "','" & arrSoftType(i) & "']);"
		End If
	Next
	Tmpl=Tmpl & "var combox_SoftType = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_SoftType_Init();}else{Zving.Page.onReady(Combox_SoftType_Init);}</script></div></div></div></td>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"语言：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <div id=""SoftLanguage_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:150px;""><input type=""text"" ztype=""select"" id=""SoftLanguage"" name=""SoftLanguage"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:150px;position:absolute;z-index:-1;"" value=""" & Trim(oSoftLanguage) & """ startvalue=""" & Trim(oSoftLanguage) & """/><input type=""text"" id=""SoftLanguage_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:150px;"" /><a id=""SoftLanguage_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""SoftLanguage_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""SoftLanguage_ul"" style=""left:-1px; width:-1px;""><script>Combox_SoftLanguage_Init=function(){var _el=Zving.getDom('SoftLanguage');if(_el._components){return true;}var  _data=[];var  _DataSource;"
	For i = 0 To UBound(arrSoftLanguage)
		If Trim(arrSoftLanguage(i)) <> "" Then
			Tmpl=Tmpl & "_data.push(['" & arrSoftLanguage(i) & "','" & arrSoftLanguage(i) & "']);"
		End If
	Next
	Tmpl=Tmpl & "var combox_SoftLanguage = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_SoftLanguage_Init();}else{Zving.Page.onReady(Combox_SoftLanguage_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">授权形式：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <div id=""CopyrightType_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:150px;""><input type=""text"" ztype=""select"" id=""CopyrightType"" name=""CopyrightType"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:150px;position:absolute;z-index:-1;"" value=""" & Trim(oCopyrightType) & """ startvalue=""" & Trim(oCopyrightType) & """/><input type=""text"" id=""CopyrightType_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:150px;"" /><a id=""CopyrightType_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""CopyrightType_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""CopyrightType_ul"" style=""left:-1px; width:-1px;""><script>Combox_CopyrightType_Init=function(){var _el=Zving.getDom('CopyrightType');if(_el._components){return true;}var  _data=[];var  _DataSource;"
	For i = 0 To UBound(arrCopyrightType)
		If Trim(arrCopyrightType(i)) <> "" Then
			Tmpl=Tmpl & "_data.push(['" & arrCopyrightType(i) & "','" & arrCopyrightType(i) & "']);"
		End If
	Next
	Tmpl=Tmpl & "var combox_CopyrightType = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_CopyrightType_Init();}else{Zving.Page.onReady(Combox_CopyrightType_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"平台：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='OperatingSystem' name='OperatingSystem' type='text' value='" & oOperatingSystem & "' size='80' maxlength='200' class=""layui-input""><script language = 'JavaScript'>" & vbCrlf
	Tmpl=Tmpl & "function ToSystem(addTitle){" & vbCrlf
	Tmpl=Tmpl & "var str=document.myform.OperatingSystem.value;" & vbCrlf
	Tmpl=Tmpl & "if (document.myform.OperatingSystem.value=="""") {" & vbCrlf
	Tmpl=Tmpl & "document.myform.OperatingSystem.value=document.myform.OperatingSystem.value+addTitle;" & vbCrlf
	Tmpl=Tmpl & "}else{" & vbCrlf
	Tmpl=Tmpl & "if (str.substr(str.length-1,1)==""/""){" & vbCrlf
	Tmpl=Tmpl & "document.myform.OperatingSystem.value=document.myform.OperatingSystem.value+addTitle;" & vbCrlf
	Tmpl=Tmpl & "}else{" & vbCrlf
	Tmpl=Tmpl & "document.myform.OperatingSystem.value=document.myform.OperatingSystem.value+""/""+addTitle;" & vbCrlf
	Tmpl=Tmpl & "}" & vbCrlf
	Tmpl=Tmpl & "}" & vbCrlf
	Tmpl=Tmpl & "document.myform.OperatingSystem.focus();" & vbCrlf
	Tmpl=Tmpl & "}" & vbCrlf
	Tmpl=Tmpl & "</script> " & vbCrlf
	Tmpl=Tmpl & "<font color='#808080'>平台选择：" & vbCrlf
	For i = 0 To UBound(arrOperatingSystem)
		If Trim(arrOperatingSystem(i)) <> "" Then
			Tmpl=Tmpl & "<a href=""javascript:ToSystem('" & arrOperatingSystem(i) & "')"">" & arrOperatingSystem(i) & "</a>/" & vbCrlf
		End If
	Next
	Tmpl=Tmpl & "</font>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">演示地址：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='DemoUrl' name='DemoUrl' type='text' value='" & oDemoUrl & "' size='80' maxlength='200' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">注册地址：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='RegUrl' name='RegUrl' type='text' value='" & oRegUrl & "' size='80' maxlength='200' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">解压密码：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='DecompressPassword' name='DecompressPassword' type='text' value='" & oDecompressPassword & "' size='30' maxlength='100' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"            </div>" & vbCrlf
	DownHome=Tmpl
End Function

Function ShopHome(oChannelID,oTxt,oProductNum,oBarCode,oUnit,oStocks,oAlarmNum,oWeight,oProductModel,oProductStandard,oProducerName,oTrademarkName)
	Dim Tmpl, i
	Tmpl=Tmpl&"            <div class=""layui-tab-item"">" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"编号：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='ProductNum' name='ProductNum' type='text' value='" & oProductNum & "' size='20' maxlength='20' disabled class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux""><input type='checkbox' id='AutoGetNum' name='AutoGetNum' value='Yes' checked onclick='document.myform.ProductNum.disabled=this.checked;' title='自动编号' lay-filter='AutoGetNum'></div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">条形码：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='BarCode' name='BarCode' type='text' value='" & oBarCode & "' size='20' maxlength='20' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"" class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"单位：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='Unit' name='Unit' type='text' value='" & oUnit & "' size='10' maxlength='20' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">库存数量：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='Stocks' name='Stocks' type='text' value='" & oStocks & "' size='10' maxlength='10' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"" class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">报警下限：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='AlarmNum' name='AlarmNum' type='text' value='" & oAlarmNum & "' size='10' maxlength='10' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"" class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">商品重量：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='Weight' name='Weight' type='text' value='" & oWeight & "' size='10' maxlength='10' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57) || (event.keyCode = 46));"" class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux"">千克（Kg）</div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"型号：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='ProductModel' name='ProductModel' type='text' value='" & oProductModel & "' size='50' maxlength='100'>&nbsp;&nbsp;&lt;&lt;&nbsp;&nbsp;"
	Tmpl=Tmpl & Vbcrlf & "<div id=""ModelList_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:150px;""><input type=""text"" ztype=""select"" id=""ModelList"" name=""ModelList"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:150px;position:absolute;z-index:-1;"" onchange='document.myform.ProductModel.value=this.value;' value=""" & Trim(oProductModel) & """ startvalue=""" & Trim(oProductModel) & """/><input type=""text"" id=""ModelList_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:150px;"" /><a id=""ModelList_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""ModelList_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""ModelList_ul"" style=""left:-1px; width:-1px;""><script>Combox_ModelList_Init=function(){var _el=Zving.getDom('ModelList');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['','请选择']);"
	For i = 0 To UBound(arrProductModel)
		If Trim(arrProductModel(i)) <> "" Then
			Tmpl=Tmpl & "_data.push(['" & arrProductModel(i) & "','" & arrProductModel(i) & "']);"
		End If
	Next
	Tmpl=Tmpl & "var combox_ModelList = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_ModelList_Init();}else{Zving.Page.onReady(Combox_ModelList_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&oTxt&"规格：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='ProductStandard' name='ProductStandard' type='text' value='" & oProductStandard & "' size='50' maxlength='100'>&nbsp;&nbsp;&lt;&lt;&nbsp;&nbsp;"
	Tmpl=Tmpl & Vbcrlf & "<div id=""StandardList_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:150px;""><input type=""text"" ztype=""select"" id=""StandardList"" name=""StandardList"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:150px;position:absolute;z-index:-1;"" onchange='document.myform.ProductStandard.value=this.value;' value=""" & Trim(oProductStandard) & """ startvalue=""" & Trim(oProductStandard) & """/><input type=""text"" id=""StandardList_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:150px;"" /><a id=""StandardList_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""StandardList_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""StandardList_ul"" style=""left:-1px; width:-1px;""><script>Combox_StandardList_Init=function(){var _el=Zving.getDom('StandardList');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['','请选择']);"
	For i = 0 To UBound(arrProductStandard)
		If Trim(arrProductStandard(i)) <> "" Then
			Tmpl=Tmpl & "_data.push(['" & arrProductStandard(i) & "','" & arrProductStandard(i) & "']);"
		End If
	Next
	Tmpl=Tmpl & "var combox_StandardList = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_StandardList_Init();}else{Zving.Page.onReady(Combox_StandardList_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">生产商：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='ProducerName' name='ProducerName' type='text' value='" & oProducerName & "' size='50' maxlength='100'>&nbsp;&nbsp;&lt;&lt;&nbsp;&nbsp;"
	Tmpl=Tmpl & Vbcrlf & "<div id=""ProducerList_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:150px;""><input type=""text"" ztype=""select"" id=""ProducerList"" name=""ProducerList"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:150px;position:absolute;z-index:-1;"" onchange='document.myform.ProducerName.value=this.value;' value=""" & Trim(oProducerName) & """ startvalue=""" & Trim(oProducerName) & """/><input type=""text"" id=""ProducerList_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:150px;"" /><a id=""ProducerList_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""ProducerList_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""ProducerList_ul"" style=""left:-1px; width:-1px;""><script>Combox_ProducerList_Init=function(){var _el=Zving.getDom('ProducerList');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['','请选择']);"
	For i = 0 To UBound(arrProducerName)
		If Trim(arrProducerName(i)) <> "" Then
			Tmpl=Tmpl & "_data.push(['" & arrProducerName(i) & "','" & arrProducerName(i) & "']);"
		End If
	Next
	Tmpl=Tmpl & "var combox_ProducerList = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_ProducerList_Init();}else{Zving.Page.onReady(Combox_ProducerList_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">品牌商标：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='TrademarkName' name='TrademarkName' type='text' value='" & oTrademarkName & "' size='50' maxlength='100'>&nbsp;&nbsp;&lt;&lt;&nbsp;&nbsp;"
	Tmpl=Tmpl & Vbcrlf & "<div id=""TrademarkList_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:150px;""><input type=""text"" ztype=""select"" id=""TrademarkList"" name=""TrademarkList"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:150px;position:absolute;z-index:-1;"" onChange='document.myform.TrademarkName.value=this.value;' value=""" & Trim(oTrademarkName) & """ startvalue=""" & Trim(oTrademarkName) & """/><input type=""text"" id=""TrademarkList_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:150px;"" /><a id=""TrademarkList_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""TrademarkList_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""TrademarkList_ul"" style=""left:-1px; width:-1px;""><script>Combox_TrademarkList_Init=function(){var _el=Zving.getDom('TrademarkList');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['','请选择']);"
	For i = 0 To UBound(arrTrademarkName)
		If Trim(arrTrademarkName(i)) <> "" Then
			Tmpl=Tmpl & "_data.push(['" & arrTrademarkName(i) & "','" & arrTrademarkName(i) & "']);"
		End If
	Next
	Tmpl=Tmpl & "var combox_TrademarkList = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_TrademarkList_Init();}else{Zving.Page.onReady(Combox_TrademarkList_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"            </div>" & vbCrlf
	Tmpl=Tmpl&"            <div class=""layui-tab-item"">" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">商品类型：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-6"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='ProductType' name='ProductType' type='radio' value='1' checked onclick='document.myform.Price.value=document.myform.Price_Original.value;document.myform.Price.disabled=true;' lay-filter='ProductType'>"
	Tmpl=Tmpl & Vbcrlf & "正常销售&nbsp;&nbsp;&nbsp;&nbsp;正常销售，没有打折的商品。<br>"
	Tmpl=Tmpl & Vbcrlf & "<input id='ProductType' name='ProductType' type='radio' value='2' onclick='document.myform.Price.disabled=false' lay-filter='ProductType'>"
	Tmpl=Tmpl & Vbcrlf & "<font color='green'> 涨价商品&nbsp;&nbsp;&nbsp;&nbsp;如内存条等一些可能涨价的商品</font><br>"
	Tmpl=Tmpl & Vbcrlf & "<input id='ProductType' name='ProductType' type='radio' value='5' onclick='getprice(document.myform.Price_Original.value);document.myform.Price.disabled=false;' lay-filter='ProductType'>"
	Tmpl=Tmpl & Vbcrlf & "<font color='red'> 降价商品&nbsp;&nbsp;&nbsp;&nbsp;折扣率："
	Tmpl=Tmpl & Vbcrlf & "<input id='Discount2' name='Discount2' type='text' value='9' size='4' maxlength='4' style='text-align: center;'>"
	Tmpl=Tmpl & Vbcrlf & "折&nbsp;&nbsp;如书籍等商品9折促销</font><br>"
	Tmpl=Tmpl & Vbcrlf & "<input id='ProductType' name='ProductType' type='radio' value='3' onclick='getprice(document.myform.Price_Original.value);document.myform.Price.disabled=false;' lay-filter='ProductType'>"
	Tmpl=Tmpl & Vbcrlf & "<font color='#c7a728'> 特价处理&nbsp;&nbsp;&nbsp;&nbsp;折扣率："
	Tmpl=Tmpl & Vbcrlf & "<input id='Discount' name='Discount' type='text' value='8' size='4' maxlength='4' style='text-align: center;'>"
	Tmpl=Tmpl & Vbcrlf & "折&nbsp;&nbsp;优惠期限："
	Tmpl=Tmpl & Vbcrlf & "<input id='BeginDate' name='BeginDate' type='text' value='" & FormatDateTime(Date, 2) & "' size='10' maxlength='10'>&nbsp;<button type=""button"" class=""layui-btn"" hidefocus=""true"" onClick=""SelectTime('BeginDate','yyyy-MM-dd','','EndDate');"">选择</button> 至"
	Tmpl=Tmpl & Vbcrlf & "<input id='EndDate' name='EndDate' type='text' value='" & FormatDateTime(DateAdd("m", 1, Date), 2) & "' size='10' maxlength='10'>&nbsp;<button type=""button"" class=""layui-btn"" hidefocus=""true"" onClick=""SelectTime('EndDate','yyyy-MM-dd','BeginDate','');"">选择</button>&nbsp;&nbsp;限购数量："
	Tmpl=Tmpl&"                        <script>" & vbCrlf
	Tmpl=Tmpl&"                        layui.use(""laydate"", function () {" & vbCrlf
	Tmpl=Tmpl&"                            var laydate = layui.laydate;" & vbCrlf
	Tmpl=Tmpl&"                            var start = laydate.render({" & vbCrlf
    Tmpl=Tmpl&"                                elem: '#BeginDate'," & vbCrlf
	Tmpl=Tmpl&"                                type:""date""," & vbCrlf
	Tmpl=Tmpl&"                                format:""yyyy-MM-dd""," & vbCrlf
    Tmpl=Tmpl&"                                min:''," & vbCrlf
    Tmpl=Tmpl&"                                done:function(value,date){" & vbCrlf
    Tmpl=Tmpl&"                                    endMax = end.config.max;" & vbCrlf
    Tmpl=Tmpl&"                                    end.config.min = date;" & vbCrlf
    Tmpl=Tmpl&"                                    end.config.min.month = date.month -1;" & vbCrlf
    Tmpl=Tmpl&"                                }" & vbCrlf
    Tmpl=Tmpl&"                            });" & vbCrlf
    Tmpl=Tmpl&"                            var end = laydate.render({" & vbCrlf
    Tmpl=Tmpl&"                                elem: '#EndDate'," & vbCrlf
	Tmpl=Tmpl&"                                type:""date""," & vbCrlf
	Tmpl=Tmpl&"                                format:""yyyy-MM-dd""," & vbCrlf
    Tmpl=Tmpl&"                                min:''," & vbCrlf
    Tmpl=Tmpl&"                                done:function(value,date){" & vbCrlf
    Tmpl=Tmpl&"                                    if($.trim(value) == ''){" & vbCrlf
    Tmpl=Tmpl&"                                        var curDate = new Date();" & vbCrlf
    Tmpl=Tmpl&"                                        date = {'date': curDate.getDate(), 'month': curDate.getMonth()+1, 'year': curDate.getFullYear()};" & vbCrlf
    Tmpl=Tmpl&"                                    }" & vbCrlf
    Tmpl=Tmpl&"                                    start.config.max = date;" & vbCrlf
    Tmpl=Tmpl&"                                    start.config.max.month = date.month -1;" & vbCrlf
    Tmpl=Tmpl&"                                }" & vbCrlf
    Tmpl=Tmpl&"                            });" & vbCrlf
	Tmpl=Tmpl&"                        })" & vbCrlf
	Tmpl=Tmpl&"                        </script>" & vbCrlf
	Tmpl=Tmpl & Vbcrlf & "<input id='LimitNum' name='LimitNum' type='text' value='0' size='4' maxlength='4' style='text-align: center;'>"
	Tmpl=Tmpl & Vbcrlf & "（0为不限制）</font><br>"
	Tmpl=Tmpl & Vbcrlf & "<input id='ProductType' name='ProductType' type='radio' value='4' onclick='document.myform.Price.disabled=false' lay-filter='ProductType'>"
	Tmpl=Tmpl & Vbcrlf & "<font color='blue'> 促销礼品&nbsp;&nbsp;&nbsp;&nbsp;购物满一定金额后换购（现价>0）或赠送（现价＝0）的礼品。</font>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">商品价格：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-6"">" & vbCrlf
	Tmpl=Tmpl&"                        <a style=""cursor:pointer;"" onClick=""ItemDialog('Test','查看价格计算公式','" & InstallDir & "Admin/" & ChannelDir & "/Admin_Help_Price.asp',770,450)""><font color='red'>查看价格计算公式</font></a></td>"
	Tmpl=Tmpl & Vbcrlf & "<td><table width='100%' border='0' cellpadding='2' cellspacing='1' bgcolor='#FFFFFF'>"
	Tmpl=Tmpl & Vbcrlf & "<tr valign='top'>"
	Tmpl=Tmpl & Vbcrlf & "<td align='right' width='80'><font color='red'>原始零售价：</font></td>"
	Tmpl=Tmpl & Vbcrlf & "<td width='130'><input id='Price_Original' name='Price_Original' type='text' value='' size='10' maxlength='10' onchange='getprice(this.value)' style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">"
	Tmpl=Tmpl & Vbcrlf & "<font color='red'>元 *</font></td>"
	Tmpl=Tmpl & Vbcrlf & "<td>正常销售时的价格。以及降价及促销时的参考价。</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "<tr valign='top'>"
	Tmpl=Tmpl & Vbcrlf & "<td align='right' width='80'><font color='blue'>当前零售价：</font></td>"
	Tmpl=Tmpl & Vbcrlf & "<td><input id='Price' name='Price' type='text' value='' size='10' maxlength='10' disabled style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">"
	Tmpl=Tmpl & Vbcrlf & "<font color='blue'>元</font>&nbsp;<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick='getprice(document.myform.Price_Original.value);'>计算</button></td>"
	Tmpl=Tmpl & Vbcrlf & "<td>系统会自动根据商品类型、原始零售价及折扣率计算当前零售价。也可以手动输入当前零售价，若降价商品的原始价格×折扣率≠输入的当前零售价，以输入的为准</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "<tr valign='top'>"
	Tmpl=Tmpl & Vbcrlf & "<td align='right' width='80'>市场参考价：</td>"
	Tmpl=Tmpl & Vbcrlf & "<td><input id='Price_Market' name='Price_Market' type='text' value='' size='10' maxlength='10' style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">"
	Tmpl=Tmpl & Vbcrlf & "元</td>"
	Tmpl=Tmpl & Vbcrlf & "<td>市场参考零售价，一般可以设高一些。如果不填或为0，前台不显示。</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "<tr valign='top'>"
	Tmpl=Tmpl & Vbcrlf & "<td align='right' width='80'>会员零售价：</td>"
	Tmpl=Tmpl & Vbcrlf & "<td><input id='Price_Member' name='Price_Member' type='text' value='' size='10' maxlength='10' style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">"
	Tmpl=Tmpl & Vbcrlf & "元</td>"
	Tmpl=Tmpl & Vbcrlf & "<td>若大于0，则会员组中设定的折扣比率无效，所有会员都以此为准，不区分组别，并且会员的折上折优惠失效。若想使用折扣比率，请保持为空或输入0。</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "<tr valign='top'>"
	Tmpl=Tmpl & Vbcrlf & "<td align='right' width='80'>代理零售价：</td>"
	Tmpl=Tmpl & Vbcrlf & "<td><input id='Price_Agent' name='Price_Agent' type='text' value='' size='10' maxlength='10' style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">"
	Tmpl=Tmpl & Vbcrlf & "元</td>"
	Tmpl=Tmpl & Vbcrlf & "<td>若大于0，则代理商组中设定的折扣比率无效，所有代理商都以此为准，不区分组别。若想使用折扣比率，请保持为空或输入0。</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "<tr valign='top'>"
	Tmpl=Tmpl & Vbcrlf & "<td colspan='6'><input id='EnableWholesale' name='EnableWholesale' type='checkbox' value='Yes' onClick=""if (this.checked==true) {Wholesale.style.display='';} else {Wholesale.style.display='none';}"" title='允许批发' lay-filter='EnableWholesale'><table width='100%' border='0' cellpadding='2' cellspacing='1' bgcolor='#FFFFFF' id='Wholesale' style='display:none;'>"
	Tmpl=Tmpl & Vbcrlf & "<tr>"
	Tmpl=Tmpl & Vbcrlf & "<td align='left'>① 一次性购买此商品数量满&nbsp;<input id='Number_Wholesale1' name='Number_Wholesale1' type='text' value='10' size='6' maxlength='6' style='text-align: right;'>&nbsp;时，批发价为&nbsp;<input id='Price_Wholesale1' name='Price_Wholesale1' type='text' value='' size='8' maxlength='10' style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">&nbsp;元</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "<tr>"
	Tmpl=Tmpl & Vbcrlf & "<td align='left'>② 一次性购买此商品数量满&nbsp;<input id='Number_Wholesale2' name='Number_Wholesale2' type='text' value='50' size='6' maxlength='6' style='text-align: right;'>&nbsp;时，批发价为&nbsp;<input id='Price_Wholesale2' name='Price_Wholesale2' type='text' value='' size='8' maxlength='10' style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">&nbsp;元</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "<tr>"
	Tmpl=Tmpl & Vbcrlf & "<td align='left'>③ 一次性购买此商品数量满&nbsp;<input id='Number_Wholesale3' name='Number_Wholesale3' type='text' value='100' size='6' maxlength='6' style='text-align: right;'>&nbsp;时，批发价为&nbsp;<input id='Price_Wholesale3' name='Price_Wholesale3' type='text' value='' size='8' maxlength='10' style='text-align: right;' onKeyPress= ""return regInput(this,/^\d*\.?\d{0,2}$/,String.fromCharCode(event.keyCode))"" onpaste= ""return regInput(this,/^\d*\.?\d{0,2}$/,window.clipboardData.getData('Text'))"" ondrop= ""return regInput(this,/^\d*\.?\d{0,2}$/,event.dataTransfer.getData('Text'))"">&nbsp;元</td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "</table></td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "</table>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">单独销售：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-1"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='EnableSingleSell' name='EnableSingleSell' type='radio' value='Yes' checked onClick=""trDependentProducts.style.display='none';"" title='是' lay-filter='EnableSingleSell'><input id='EnableSingleSell' name='EnableSingleSell' type='radio' value='No' onClick=""trDependentProducts.style.display='';"" title='否' lay-filter='EnableSingleSell'>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux""><font color='blue'>如果不允许单独销售，请指定从属的商品。</font></div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"" id=""trDependentProducts"" style=""display:none;"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">从属商品：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-2"">" & vbCrlf
	Tmpl=Tmpl&"                        <table width='100%' border='0' cellspacing='5' cellpadding='0'>"
	Tmpl=Tmpl & Vbcrlf & "<tr>"
	Tmpl=Tmpl & Vbcrlf & "<td width='200'><select name='DependentProductsList' size='2' multiple id='DependentProductsList' style='height:100px;width:200px;' lay-ignore>"
	Tmpl=Tmpl & Vbcrlf & "</select></td>"
	Tmpl=Tmpl & Vbcrlf & "<td><button type=""button"" class=""layui-btn"" hidefocus=""true"" onClick=""AddDependentProduct('" & oChannelID & "','" & ChannelDir & "','DependentProductsList')"">添加商品</button>"
	Tmpl=Tmpl & Vbcrlf & "<br>"
	Tmpl=Tmpl & Vbcrlf & "<input name='DependentProducts' type='hidden' id='DependentProducts'>"
	Tmpl=Tmpl & Vbcrlf & "<br>"
	Tmpl=Tmpl & Vbcrlf & "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onClick=""DelDependentProduct('" & oChannelID & "','" & ChannelDir & "','DependentProductsList')""> 删 除 </button></td>"
	Tmpl=Tmpl & Vbcrlf & "</tr>"
	Tmpl=Tmpl & Vbcrlf & "</table>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-form-mid layui-word-aux"">如果不指定从属商品，则可以与任何非促销礼品捆绑销售。</div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"            </div>" & vbCrlf
	Tmpl=Tmpl&"            <div class=""layui-tab-item"">" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">促销方案：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input id='SalePromotionType' name='SalePromotionType' type='radio' value='0' checked onclick=''>"
    Tmpl=Tmpl & Vbcrlf & "不促销<br>"
    Tmpl=Tmpl & Vbcrlf & "<input id='SalePromotionType' name='SalePromotionType' type='radio' value='1' onclick=''>"
    Tmpl=Tmpl & Vbcrlf & "<font color='red'> 买"
    Tmpl=Tmpl & Vbcrlf & "<input id='MinNumber1' name='MinNumber1' type='text' value='2' size='4' maxlength='4' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "送"
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentNumber1' name='PresentNumber1' type='text' value='1' size='4' maxlength='4' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "同样的商品</font><br>"
    Tmpl=Tmpl & Vbcrlf & "<input id='SalePromotionType' name='SalePromotionType' type='radio' value='2' onclick=''>"
    Tmpl=Tmpl & Vbcrlf & "<font color='blue'> 买"
    Tmpl=Tmpl & Vbcrlf & "<input id='MinNumber2' name='MinNumber2' type='text' value='2' size='4' maxlength='4' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "送"
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentNumber2' name='PresentNumber2' type='text' value='1' size='4' maxlength='4' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "其他商品&nbsp;&nbsp;&nbsp;赠品编号："
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentID' name='PresentID' type='text' value='' size='20' maxlength='30'>&nbsp;<button type=""button"" class=""layui-btn"" hidefocus=""true"" onClick=""SelectPresent('" & oChannelID & "','" & ChannelDir & "','PresentID');"">...</button>"
    Tmpl=Tmpl & Vbcrlf & "</font><br>"
    Tmpl=Tmpl & Vbcrlf & "<input id='SalePromotionType' name='SalePromotionType' type='radio' value='3' onclick=''>"
    Tmpl=Tmpl & Vbcrlf & "<font color='red'> 买&nbsp;&nbsp; 就&nbsp;&nbsp; 送"
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentNumber3' name='PresentNumber3' type='text' value='1' size='4' maxlength='4' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "同样的商品</font><br>"
    Tmpl=Tmpl & Vbcrlf & "<input id='SalePromotionType' name='SalePromotionType' type='radio' value='4' onclick=''>"
    Tmpl=Tmpl & Vbcrlf & "<font color='blue'> 买&nbsp;&nbsp;就&nbsp;&nbsp;送"
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentNumber4' name='PresentNumber4' type='text' value='1' size='4' maxlength='4' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "其他商品&nbsp;&nbsp;&nbsp;赠品编号："
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentID2' name='PresentID2' type='text' value='' size='20' maxlength='30'>&nbsp;<button type=""button"" class=""layui-btn"" hidefocus=""true"" onClick=""SelectPresent('" & oChannelID & "','" & ChannelDir & "','PresentID2');"">...</button>"
    Tmpl=Tmpl & Vbcrlf & "</font><br>"
    Tmpl=Tmpl & Vbcrlf & "买满××元返还××元现金（券），买满××元在促销商品中任选等更多促销方案请到""促销方案管理""中设置。" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">赠送点券：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        购买一件此商品可以得到"
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentPoint' name='PresentPoint' type='text' value='0' size='6' maxlength='9' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "点券<br>"
    Tmpl=Tmpl & Vbcrlf & "买满××元可以得××点券等更多促销方案，请到""促销方案管理""中设置。" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">购物积分：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        购买一件此商品可以得到"
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentExp' name='PresentExp' type='text' value='0' size='6' maxlength='9' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "积分<br>"
    Tmpl=Tmpl & Vbcrlf & "买满××元可以得××积分等更多促销方案，请到""促销方案管理""中设置。" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">赠送现金券：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        购买一件此商品可以得到"
    Tmpl=Tmpl & Vbcrlf & "<input id='PresentMoney' name='PresentMoney' type='text' value='0' size='6' maxlength='9' style='text-align: center;' onKeyPress=""event.returnValue=((event.keyCode >= 48) && (event.keyCode <= 57));"">"
    Tmpl=Tmpl & Vbcrlf & "元现金券<br>"
    Tmpl=Tmpl & Vbcrlf & "买满××元可以得××元现金券等更多促销方案，请到""促销方案管理""中设置。" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">销售操作：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input name='EnableSale' type='checkbox' id='EnableSale' value='Yes' checked title='立即销售'>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"            </div>" & vbCrlf
	ShopHome=Tmpl
End Function

'//* 模型标题、副标题、标题颜色*//
Function TopicShowColor(ByVal oIncludeInfo,ByVal iTopic,ByVal jTopic,ByVal iColor,ByVal jColor,ByVal iSubtitle,ByVal jSubtitle,ByVal iSubheading,ByVal jSubheading,ByVal oID)
	Dim Tmpl
	Tmpl=Tmpl&"            <div class=""layui-tab-item layui-show"">" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">简短标题：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-i"">" & vbCrlf
	Tmpl=Tmpl&"                        <div id=""IncludeInfo_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:80px;""><input type=""text"" ztype=""select"" id=""IncludeInfo"" name=""IncludeInfo"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:80px;position:absolute;z-index:-1;"" value=""" & oIncludeInfo & """ startvalue=""" & oIncludeInfo & """/><input type=""text"" id=""IncludeInfo_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:80px;"" /><a id=""IncludeInfo_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""IncludeInfo_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""IncludeInfo_ul"" style=""left:-1px; width:-1px;""><script>Combox_IncludeInfo_Init=function(){var _el=Zving.getDom('IncludeInfo');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['0','[为空]']);_data.push(['1','[话题]']);_data.push(['2','[图文]']);_data.push(['3','[组图]']);_data.push(['4','[推荐]']);_data.push(['5','[观点]']);_data.push(['6','[转载]']);var combox_IncludeInfo = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_IncludeInfo_Init();}else{Zving.Page.onReady(Combox_IncludeInfo_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-2"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='"&iTopic&"' name='"&iTopic&"' value='"&jTopic&"' size='40' maxlength='255' class='layui-input' lay-verify="""&iTopic&""" onblur=""check_title('"&iTopic&"','"&ChannelID&"','" & ChannelDir & "/','"&oID&"','Admin_" & ChannelDir & ".asp');get_keywords('"&iTopic&"','" & ChannelDir & "/','Admin_" & ChannelDir & ".asp','Keyes');"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-t"">" & vbCrlf
	Tmpl=Tmpl&"                        <span id='title_tips'></span>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    " & ShowColor(iColor,jColor) & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-2"">" & vbCrlf
	Tmpl=Tmpl&"                        <span data-default="""
	If jColor<>"" Then Tmpl=Tmpl&"#"&jColor&""
	Tmpl=Tmpl&""" class=""color-picker-box"" id=""primary_color""></span>" & vbCrlf
	Tmpl=Tmpl&"                        <script>" & vbCrlf
	Tmpl=Tmpl&"                        layui.use(['colorpicker'], function () {" & vbCrlf
	Tmpl=Tmpl&"                            var colorpicker = layui.colorpicker;" & vbCrlf
	Tmpl=Tmpl&"                            //颜色系统 - 渲染颜色选择器" & vbCrlf
	Tmpl=Tmpl&"                            colorpicker.render({" & vbCrlf
	Tmpl=Tmpl&"                                elem: '#primary_color'" & vbCrlf
	Tmpl=Tmpl&"                                ,color: $('#primary_color').data('default')" & vbCrlf
	Tmpl=Tmpl&"                                ,predefine: true" & vbCrlf
	Tmpl=Tmpl&"                                ,change: function(color){" & vbCrlf
	Tmpl=Tmpl&"                                    var dR = color.toUpperCase();" & vbCrlf
	Tmpl=Tmpl&"                                    if (dR.length == 7) {" & vbCrlf
	Tmpl=Tmpl&"                                        dR = dR.substr(1, dR.length);" & vbCrlf
	Tmpl=Tmpl&"                                    }" & vbCrlf
	Tmpl=Tmpl&"                                    $('#"&iColor&"').css('background',color);" & vbCrlf
	Tmpl=Tmpl&"                                    $('#"&iColor&"').css('color',getFontColor(dR));" & vbCrlf
	Tmpl=Tmpl&"                                    $('#"&iColor&"').val(dR);" & vbCrlf
	Tmpl=Tmpl&"                                }" & vbCrlf
	Tmpl=Tmpl&"                                ,done: function(color){" & vbCrlf
	Tmpl=Tmpl&"                                    var dR = color.toUpperCase();" & vbCrlf
	Tmpl=Tmpl&"                                    if (dR.length == 7) {" & vbCrlf
	Tmpl=Tmpl&"                                        dR = dR.substr(1, dR.length);" & vbCrlf
	Tmpl=Tmpl&"                                    }" & vbCrlf
	Tmpl=Tmpl&"                                    $('#"&iColor&"').css('background',color);" & vbCrlf
	Tmpl=Tmpl&"                                    $('#"&iColor&"').css('color',getFontColor(dR));" & vbCrlf
	Tmpl=Tmpl&"                                    $('#"&iColor&"').val(dR);" & vbCrlf
	Tmpl=Tmpl&"                                }" & vbCrlf
	Tmpl=Tmpl&"                            });" & vbCrlf
	Tmpl=Tmpl&"                        });" & vbCrlf
	Tmpl=Tmpl&"                        </script>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">完整标题：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='"&iSubtitle&"' name='"&iSubtitle&"' size='80' maxlength='255' value='"&jSubtitle&"' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">副 标 题：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='"&iSubheading&"' name='"&iSubheading&"' size='80' maxlength='255' value='"&jSubheading&"' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	TopicShowColor=Tmpl
End Function

'//* 模型后台发布信息出处、编辑属性 *//
Function Info_Derivation(oAuthor,oInputer,oComTo,oTim,oTxt,oDisabled,oChannelID)
	Dim Tmpl,rschc,sqlchc
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&ChannelTit&"作者：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='Author' name='Author' value='"&oAuthor&"' size='30' maxlength='50' class=""layui-input"">" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	If Login_Username<>"" Then
		Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
		Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&ChannelTit&"编辑：</label>" & vbCrlf
		Tmpl=Tmpl&"                    <div class=""layui-input-4"">" & vbCrlf
		Tmpl=Tmpl&"                        <input type='text' id='Inputer' name='Inputer' value='"&oInputer&"' size='30' maxlength='50' class=""layui-input"">" & vbCrlf
		Tmpl=Tmpl&"                    </div>" & vbCrlf
		Tmpl=Tmpl&"                </div>" & vbCrlf
	End If
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">"&ChannelTit&"来源：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-2"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='CopyFrom' name='CopyFrom' value='"&oComTo&"' size='30' maxlength='255' class='layui-input'>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-t"">" & vbCrlf
	Tmpl=Tmpl&"                        &lt;&lt;" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-3"">" & vbCrlf
	Tmpl=Tmpl&"                        <div id=""addfromsite_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:120px;""><input type=""text"" ztype=""select"" id=""addfromsite"" name=""addfromsite"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:120px;position:absolute;z-index:-1;"" onchange='document.myform.CopyFrom.value=this.value;' value="""" startvalue=""""/><input type=""text"" id=""addfromsite_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:120px;"" /><a id=""addfromsite_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""addfromsite_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""addfromsite_ul"" style=""left:-1px; width:-1px;""><script>Combox_addfromsite_Init=function(){var _el=Zving.getDom('addfromsite');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['"&oComTo&"','默认来源']);"
	sqlchc = "select id,SourceName from CopyFrom Where ChannelID="&ChannelID&" order by id desc"
	Call Exe_Conn(rschc,sqlchc,1)
	if rschc.eof and rschc.bof Then
	Tmpl=Tmpl&Vbcrlf&"_data.push(['','请先添加来源']);"
	else
	do while not rschc.EOF
	Tmpl=Tmpl&Vbcrlf&"_data.push(['"&rschc("SourceName")&"','"&rschc("SourceName")&"']);"
	rschc.MoveNext 
	loop
	end if
	rschc.Close 
	set rschc=nothing
	Tmpl=Tmpl&Vbcrlf&"var combox_addfromsite = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_addfromsite_Init();}else{Zving.Page.onReady(Combox_addfromsite_Init);}</script></div></div></div>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Tmpl=Tmpl&"                <div class=""layui-form-item"">" & vbCrlf
	Tmpl=Tmpl&"                    <label class=""layui-form-label"">发布时间：</label>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-2"">" & vbCrlf
	Tmpl=Tmpl&"                        <input type='text' id='Tim' name='Tim' value='"&Time_Type(oTim,1)&"' size='30' maxlength='20' "&oDisabled&" class='layui-input'>" & vbCrlf
	Tmpl=Tmpl&"                        <script>" & vbCrlf
	Tmpl=Tmpl&"                        layui.use(""laydate"", function () {" & vbCrlf
	Tmpl=Tmpl&"                            var laydate = layui.laydate;" & vbCrlf
	Tmpl=Tmpl&"                            laydate.render({" & vbCrlf
	Tmpl=Tmpl&"                                elem: ""#Tim""," & vbCrlf
	Tmpl=Tmpl&"                                type:""datetime""," & vbCrlf
	Tmpl=Tmpl&"                                format:""yyyy-MM-dd HH:mm:ss""" & vbCrlf
	Tmpl=Tmpl&"                            });" & vbCrlf
	Tmpl=Tmpl&"                        })" & vbCrlf
	Tmpl=Tmpl&"                        </script>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-i"">" & vbCrlf
	Tmpl=Tmpl&"                        <button type=""button"" class=""layui-btn"" hidefocus=""true"" onClick=""SelectTime('Tim','yyyy-MM-dd HH:mm:ss','','');"">选择</button>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                    <div class=""layui-input-t"">" & vbCrlf
	Tmpl=Tmpl&"                        日期格式：<font class=blue>年-月-日 小时:分钟:秒</font>" & vbCrlf
	Tmpl=Tmpl&"                    </div>" & vbCrlf
	Tmpl=Tmpl&"                </div>" & vbCrlf
	Info_Derivation=Tmpl
End Function
%>